/* BPMN设计器全局汉化CSS */

/* 隐藏所有英文tooltip，显示中文tooltip */
.djs-palette .entry[title="Start Event"] {
  position: relative;
}

.djs-palette .entry[title="Start Event"]:hover::after {
  content: "开始事件" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="End Event"] {
  position: relative;
}

.djs-palette .entry[title="End Event"]:hover::after {
  content: "结束事件" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Task"] {
  position: relative;
}

.djs-palette .entry[title="Task"]:hover::after {
  content: "任务" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="User Task"] {
  position: relative;
}

.djs-palette .entry[title="User Task"]:hover::after {
  content: "用户任务" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Service Task"] {
  position: relative;
}

.djs-palette .entry[title="Service Task"]:hover::after {
  content: "服务任务" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Script Task"] {
  position: relative;
}

.djs-palette .entry[title="Script Task"]:hover::after {
  content: "脚本任务" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Manual Task"] {
  position: relative;
}

.djs-palette .entry[title="Manual Task"]:hover::after {
  content: "手工任务" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Business Rule Task"] {
  position: relative;
}

.djs-palette .entry[title="Business Rule Task"]:hover::after {
  content: "业务规则任务" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Exclusive Gateway"] {
  position: relative;
}

.djs-palette .entry[title="Exclusive Gateway"]:hover::after {
  content: "排他网关" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Parallel Gateway"] {
  position: relative;
}

.djs-palette .entry[title="Parallel Gateway"]:hover::after {
  content: "并行网关" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Inclusive Gateway"] {
  position: relative;
}

.djs-palette .entry[title="Inclusive Gateway"]:hover::after {
  content: "包容网关" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Sub Process"] {
  position: relative;
}

.djs-palette .entry[title="Sub Process"]:hover::after {
  content: "子流程" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Data Object"] {
  position: relative;
}

.djs-palette .entry[title="Data Object"]:hover::after {
  content: "数据对象" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

.djs-palette .entry[title="Text Annotation"] {
  position: relative;
}

.djs-palette .entry[title="Text Annotation"]:hover::after {
  content: "文本注释" !important;
  position: absolute !important;
  bottom: -35px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 500 !important;
}

/* 隐藏原生tooltip */
.djs-palette .entry[title]:hover {
  position: relative;
}

/* 属性面板汉化 */
.bpp-properties-panel *[title="Name"]:hover::after,
.bpp-properties-panel *:contains("Name"):hover::after {
  content: "名称" !important;
  position: absolute !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  font-size: 11px !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

/* 通用文本替换 */
.bpp-properties-panel .bpp-field label:contains("Name") {
  text-indent: -9999px;
}

.bpp-properties-panel .bpp-field label:contains("Name")::after {
  content: "名称";
  text-indent: 0;
  display: block;
}
